/**
 * 封装 axios
 */
import axios from 'axios'
const ERR_OK = 0
export function get(url, params) {
  return new Promise((resolve, reject) => {
    axios.get(url, {
      params: params
    }).then((res) => {
      console.log(res);
      if (errno === ERR_OK) {
        resolve(res.data)
      }
    }).catch((error) => {
      console.error('请求失败' + error)
    })
  })
}
